package lxj.ch05;

/**
 * 二叉树结点
 */
public class BiTreeNode {

    private Object data;
    private BiTreeNode leftChild;
    private BiTreeNode rightChild;

    public BiTreeNode() {
        this(null);
    }

    public BiTreeNode(Object data) {
        this(data, null, null);
    }

    public BiTreeNode(Object data, BiTreeNode leftChild, BiTreeNode rightChild) {
        this.data = data;
        this.leftChild = leftChild;
        this.rightChild = rightChild;
    }

    public Object getData() {
        return data;
    }

    public BiTreeNode getLeftChild() {
        return leftChild;
    }

    public BiTreeNode getRightChild() {
        return rightChild;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public void setLeftChild(BiTreeNode leftChild) {
        this.leftChild = leftChild;
    }

    public void setRightChild(BiTreeNode rightChild) {
        this.rightChild = rightChild;
    }

}
